import sys
import subprocess
import coin.strategy.mm.simple_sim.profile.pass_unhedge_kraken as config_py


def get_configs():
  return [name for name in dir(config_py) if name.startswith('config_')]


date = sys.argv[1]
cmd1 = 'echo {config_name} {date} | slackcat -c xguo'
cmd2 = './pyrunner coin/strategy/mm/simple_sim/runner.py pass_unhedge_kraken {config_name} {date} | slackcat -c xguo'

for config_name in get_configs():
  command = cmd1.format(config_name=config_name, date=date)
  subprocess.run(command, shell=True)

  command = cmd2.format(config_name=config_name, date=date)
  subprocess.run(command, shell=True)
